<template>
    <div id="play">
        <van-icon name="arrow-left" class="topleft" @click="back"/>
        <h1>猫眼电影</h1>
        <van-icon name="bars" class="topright"/>
        <div class="background" :style="{
            'background':`url(${vlist.video.imgUrl})`,
            'background-repeat':'no-repeat',
            'background-size': 'cover'}">
        </div>
        <span class="title">《{{vlist.shareInfo.title}}  》</span>
            <video class="play" controls>
                <source :src="vlist.video.url" type="video/mp4"/>
            </video>
        <div class="comment">
            <van-row gutter="20">
                <van-col span="8"><van-image round width="3rem" height="3rem" :src="vlist.user.avatarurl"/>{{vlist.shareInfo.content}}</van-col>
                <van-col span="8"><van-icon name="good-job-o" size="3rem" class="kk" />{{vlist.upCount}}</van-col>
                <van-col span="6"><van-icon name="chat-o" size="3rem" class="kk" />评论</van-col>
            </van-row>
        </div>
    </div>
</template>

<script>
export default {
    name:'videoplay',
    props:['vlist'],
    data(){
        return {
        }
    },
    methods:{
        back(){
            this.$router.go(-1);
        }, 
    },
    mounted(){
        console.log(this.vlist)
    },
}
</script>

<style scoped>
*{
    padding: 0;
    margin: 0;
}
h1{
    width: 100%;
    text-align: center;
    height: 50px;
    font-size: 20px;
    line-height: 50px;
    background-color: rgb(235, 56, 56);
    color: white;
    font-weight: 500;
}
.topleft{
    position: absolute;
    color: white;
    font-size: 32px;
    left: 0;
    top: 10px;
}
.topright{
    position: absolute;
    font-size: 32px;
    color: white;
    right: 0;
    top: 10px;
}
#play{
    width: 100%;
    height: 100vh; 
    display: flex;
    flex-direction: column;
}
#play .background{
    width: 100%;
    height: 100vh;
    opacity: 0.5;
}
#play .title{
    position: absolute;
    width: 100%;
    font-size: 20px;
    color: rgb(36, 36, 31);
    font-weight: 600;
    top:20vh;
    text-align: center;
}
#play .play{
    width: 100%;
    height: auto;
    position: absolute;
    top:30vh
}
#play .comment{
    position: absolute;
    top:58vh;
    width: 100%;
}
.kk{
    background-color: rgba(174, 164, 164, 0.7);
    border-radius:15px;
}
</style>